// 我的钱包
<template>
  <div class="purseBox">
    <div class="purseBox1">
      <img
        src="../../../images//fae98107-94c4-47d1-ab04-f3e21ba7d864.png"
        alt=""
        @click="goBack"
      />
      <h4>我的钱包</h4>
      <b @click="golook">查看绑定</b>
    </div>
    <div class="purseBox2">
      <div class="purseBox3">
        <h3>我的H币</h3>
        <h1>29870</h1>
        <p>(满20000可提现)</p>
        <button class="cash" @click="goPayout">提现</button>
      </div>
      <div class="purseBox4">
        <div v-for="item in purseList" :key="item.id" class="message">
          <p class="user">{{ item.name }}</p>
          <span class="text">{{ item.money }}</span>
          <span class="num">{{ item.num }}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from "vue-router";
const router = useRouter();

const purseList = [
  {
    id: 1,
    name: "问诊咨询",
    money: "2018.11.10",
    num: "+500H币",
  },
  {
    id: 2,
    name: "病友圈建议被采纳",
    money: "2018.11.09",
    num: "+100H币",
  },
  {
    id: 3,
    name: "提现",
    money: "2018.11.10",
    num: "-300H币",
  },
  {
    id: 4,
    name: "病友圈建议被采纳",
    money: "2018.11.09",
    num: "+100H币",
  },
  {
    id: 5,
    name: "问诊咨询",
    money: "2018.11.10",
    num: "+500H币",
  },
];
const goBack = () => {
  router.push("Myimt");
};

const goPayout = () => {
  router.push("/Payout");
};
const golook = () => {
  router.push("/LookBind");
};
</script>

<style lang="scss">
.purseBox1 {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  h4 {
    font-size: 16px;
    padding-left: 30px;
  }
  b {
    font-size: 16px;
    padding-right: 20px;
  }
  .el-icon-back {
    font-size: 25px;
  }
}
.purseBox2 {
  width: 100%;
  height: 100%;
  .purseBox3 {
    width: 90%;
    height: 200px;
    background: #228fe7;
    margin-left: 20px;
    position: relative;
    h3 {
      width: 100%;
      height: 15px;
      color: #fff;
      padding: 20px;
    }
    h1 {
      width: 100%;
      height: 30px;
      padding-left: 10px;
      color: #fff;
    }
    p {
      padding-left: 10px;
      color: #fff;
    }
    .cash {
      width: 70px;
      height: 40px;
      position: absolute;
      right: 30px;
      top: 145px;
      font-size: 20px;
      color: #3699e9;
      border: none;
      background: #fff;
    }
  }
  .purseBox4 {
    width: 90%;
    height: 100%;
    margin-left: 20px;
    position: relative;
    .message {
      border-bottom: 1px solid #000;
      .text {
        font-size: 16px;
      }
      .num {
        position: absolute;
        right: 0px;
        color: red;
        font-size: 16px;
      }
    }
  }
}
</style>
